<?php

require_once(sfConfig::get('sf_lib_dir').'/filter/base/BaseFormFilterPropel.class.php');

/**
 * Configuracioncurso filter form base class.
 *
 * @package    hegeprosoft
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormFilterGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseConfiguracioncursoFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'cfc_metodologia'          => new sfWidgetFormFilterInput(),
      'cfc_roles'                => new sfWidgetFormFilterInput(),
      'cfc_fechaEntrega'         => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'cfc_fase'                 => new sfWidgetFormPropelChoice(array('model' => 'Fase', 'add_empty' => true)),
      'cfc_artefacto'            => new sfWidgetFormPropelChoice(array('model' => 'Artefactos', 'add_empty' => true)),
      'cfc_actividad'            => new sfWidgetFormPropelChoice(array('model' => 'Actividad', 'add_empty' => true)),
      'cfc_curso'                => new sfWidgetFormPropelChoice(array('model' => 'Curso', 'add_empty' => true)),
    ));

    $this->setValidators(array(
      'cfc_metodologia'          => new sfValidatorPass(array('required' => false)),
      'cfc_roles'                => new sfValidatorPass(array('required' => false)),
      'cfc_fechaEntrega'         => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDate(array('required' => false)))),
      'cfc_fase'                 => new sfValidatorPropelChoice(array('required' => false, 'model' => 'Fase', 'column' => 'fas_IdFase')),
      'cfc_artefacto'            => new sfValidatorPropelChoice(array('required' => false, 'model' => 'Artefactos', 'column' => 'art_IdArtefacto')),
      'cfc_actividad'            => new sfValidatorPropelChoice(array('required' => false, 'model' => 'Actividad', 'column' => 'act_IdActividad')),
      'cfc_curso'                => new sfValidatorPropelChoice(array('required' => false, 'model' => 'Curso', 'column' => 'cur_IdCurso')),
    ));

    $this->widgetSchema->setNameFormat('configuracioncurso_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Configuracioncurso';
  }

  public function getFields()
  {
    return array(
      'cfc_IdConfiguracionCurso' => 'Number',
      'cfc_metodologia'          => 'Text',
      'cfc_roles'                => 'Text',
      'cfc_fechaEntrega'         => 'Date',
      'cfc_fase'                 => 'ForeignKey',
      'cfc_artefacto'            => 'ForeignKey',
      'cfc_actividad'            => 'ForeignKey',
      'cfc_curso'                => 'ForeignKey',
    );
  }
}
